$OpenBSD: patch-Canna_conf,v 1.4 2008/08/29 15:01:29 espie Exp $
--- Canna.conf.orig	Thu Nov 28 11:27:01 1996
+++ Canna.conf	Fri Aug 29 16:52:05 2008
@@ -129,19 +129,19 @@
  */
 
-cannaBinDir = /usr/local/canna/bin
-cannaSrvDir = /usr/local/canna/bin
-cannaLibDir = /usr/local/canna/lib
-cannaManDir = /usr/local/canna/man
-cannaIncDir = /usr/local/canna/include/canna
-libCannaDir = /usr/lib
+cannaBinDir = ${BINDIR}
+cannaSrvDir = ${BINDIR}
+cannaLibDir = ${USRLIBDIR}
+cannaManDir = ${MANPATH}
+cannaIncDir = ${INCDIR}/canna
+libCannaDir = ${USRLIBDIR}
 
-ErrDir  = /usr/spool/canna
+ErrDir  = ${CANNA_SPOOL}
 
 wcharDefinition = -DCANNA_WCHAR
 Wlib =
-JapaneseLocale = japanese
+JapaneseLocale = ja_JP.eucJP
 
-cannaOwner = bin
-cannaGroup = bin
+cannaOwner = ${CANNAOWNER}
+cannaGroup = ${CANNAGROUP}
 
 cannaOwnerGroup = -o $(cannaOwner) -g $(cannaGroup)
@@ -149,5 +149,10 @@ cannaOwnerGroup = -o $(cannaOwner) -g $(cannaGroup)
 pointerIntegerDef =
 
-cannaDsoRev = 1
+cannaDsoRev = 1.0
+LIBRKC_VERSION= 1.0
+LIBRKC16_VERSION= 1.0
+LIBcanna_VERSION= 1.0
+LIBcanna16_VERSION = 1.0
+
     /* SunOS 4.x �򤪻Ȥ������� shared object �����Ѥ�����ˤ�
             cannaDsoRev = 1.1
@@ -205,5 +210,5 @@ dontHaveRename = 0
 #define UseInstalledLibCanna NO
 
-DicDir   = $(cannaLibDir)/dic
+DicDir   = ${DICT_DIR}
 
 #ifdef NeXT
@@ -232,5 +237,5 @@ DicDir   = $(cannaLibDir)/dic
 #if UseInstalledLibCanna
 # if DoSharedLib
-    DEPCANNALIB = $(libCannaDir)/libcanna.$(sharedLibExtension)
+    DEPCANNALIB = $(libCannaDir)/libcanna.so.$(LIBcanna_VERSION)
 # else
 #ifdef __EMX__
@@ -243,5 +248,5 @@ DicDir   = $(cannaLibDir)/dic
 #else /* ! UseInstalledLibCanna */
 # if DoSharedLib
-    DEPCANNALIB = $(CANNASRC)/libcanna.$(sharedLibExtension)
+    DEPCANNALIB = $(CANNASRC)/libcanna.so.$(LIBcanna_VERSION)
 # else
 #ifdef __EMX__
@@ -256,5 +261,5 @@ DicDir   = $(cannaLibDir)/dic
 #if UseInstalledLibCanna
 # if DoSharedLib
-    DEPCANNALIB16 = $(libCannaDir)/libcanna16.$(sharedLibExtension)
+    DEPCANNALIB16 = $(libCannaDir)/libcanna16.so.$(LIBcanna16_VERSION)
 # else
     DEPCANNALIB16 = $(libCannaDir)/libcanna16.a
@@ -263,5 +268,5 @@ DicDir   = $(cannaLibDir)/dic
 #else /* ! UseInstalledLibCanna */
 # if DoSharedLib
-    DEPCANNALIB16 = $(CANNASRC)/libcanna16.$(sharedLibExtension)
+    DEPCANNALIB16 = $(CANNASRC)/libcanna16.so.$(LIBcanna16_VERSION)
 # else
     DEPCANNALIB16 = $(CANNASRC)/libcanna16.a
@@ -323,15 +328,34 @@ clean::									@@\
 #endif
 
+#define JNeqnCmd		jneqn -Tnippon
+#define JNroffCmd		jnroff -Tnippon
+#define JEqnCmd			jeqn -Tnippon -Tps
+#define JTroffCmd		jgroff -Tnippon -Tps
+#define JColCmd			cat 
+#define JTblCmd			jtbl -Tnippon
+
+           JTROFF = JTroffCmd
+           JNROFF = JNroffCmd
+             JTBL = JTblCmd
+             JEQN = JEqnCmd
+            JNEQN = JNeqnCmd
+             JCOL = JColCmd
+
 #ifdef InstallManPageLong
 #undef InstallManPageLong
 #endif
 #define	InstallManPageLong(file,destdir,dest)				@@\
-ConvertPathName(file.tmp,file.$(MANSRCSUFF))				@@\
-install.man:: file.tmp							@@\
-	MakeDir($(DESTDIR)destdir/man$(MANSUFFIX))			@@\
-	$(INSTALL) -c $(INSTMANFLAGS) file.tmp $(DESTDIR)destdir/man$(MANSUFFIX)/dest.$(MANSUFFIX)	@@\
-	$(RM) file.tmp							@@\
+ConvertPathName(file.jtmp,file.jmn)				        @@\
+ConvertPathName(file.tmp,file.man)				        @@\
+install.man:: file.tmp file.jtmp					@@\
+	MakeDir($(DESTDIR)destdir/ja_JP.EUC/cat$(MANSUFFIX))		@@\
+	MakeDir($(DESTDIR)destdir/cat$(MANSUFFIX))			@@\
+	cat file.tmp | $(NEQN) | $(TBL) | $(NROFF) $(MANMACROS) | $(COL) > file.0; \	@@\
+	$(INSTALL) -c $(INSTMANFLAGS) file.0 $(DESTDIR)destdir/cat$(MANSUFFIX)/dest.0	@@\
+	cat file.jtmp | $(JNEQN) | $(JTBL) | $(JNROFF) $(MANMACROS) | $(JCOL) > file.j0; \	@@\
+	$(INSTALL) -c $(INSTMANFLAGS) file.j0 $(DESTDIR)destdir/ja_JP.EUC/cat$(MANSUFFIX)/dest.0	@@\
+	$(RM) file.tmp file.jtmp file.0 file.j0				@@\
 clean::									@@\
-	$(RM) file.tmp
+	$(RM) file.tmp file.jtmp file.0 file.j0			
 
 #ifdef InstallManPage
@@ -345,11 +369,16 @@ InstallManPageLong(file,destdir,file)
 #endif
 #define	InstallLibManPageLong(file,destdir,dest)			@@\
-ConvertPathName(file.tmp,file.$(MANSRCSUFF))				@@\
-install.man:: file.tmp							@@\
-	MakeDir($(DESTDIR)destdir/man$(LIBMANSUFFIX))			@@\
-	$(INSTALL) -c $(INSTMANFLAGS) file.tmp $(DESTDIR)destdir/man$(LIBMANSUFFIX)/dest.$(LIBMANSUFFIX)	@@\
-	$(RM) file.tmp							@@\
+ConvertPathName(file.jtmp,file.jmn)					@@\
+ConvertPathName(file.tmp,file.man)					@@\
+install.man:: file.tmp file.jtmp					@@\
+	MakeDir($(DESTDIR)destdir/ja_JP.EUC/cat$(LIBMANSUFFIX))		@@\
+	MakeDir($(DESTDIR)destdir/cat$(LIBMANSUFFIX))			@@\
+	cat file.tmp | $(NEQN) | $(TBL) | $(NROFF) $(MANMACROS) | $(COL) > file.0; \	@@\
+	$(INSTALL) -c $(INSTMANFLAGS) file.0 $(DESTDIR)destdir/cat$(LIBMANSUFFIX)/dest.0	@@\
+	cat file.jtmp | $(JNEQN) | $(JTBL) | $(JNROFF) $(MANMACROS) | $(JCOL) > file.j0; \	@@\
+	$(INSTALL) -c $(INSTMANFLAGS) file.j0 $(DESTDIR)destdir/ja_JP.EUC/cat$(LIBMANSUFFIX)/dest.0	@@\
+	$(RM) file.tmp file.jtmp file.0 file.j0				@@\
 clean::									@@\
-	$(RM) file.tmp
+	$(RM) file.tmp file.jtmp file.0 file.j0			
 
 #ifdef InstallLibManPage
@@ -364,11 +393,14 @@ InstallLibManPageLong(file,destdir,file)
 #define InstallLibManPageAliases(file,destdir,aliases)			@@\
 install.man::								@@\
-	@(TMP=/tmp/tmp.$$$$; \						@@\
-	$(RM) $${TMP}; \						@@\
-	echo .so `basename destdir/man$(LIBMANSUFFIX)`/file.$(LIBMANSUFFIX) > $${TMP}; \	@@\
-	for i in aliases; do (set -x; \					@@\
-	$(INSTALL) -c $(INSTMANFLAGS) $${TMP} $(DESTDIR)destdir/man$(LIBMANSUFFIX)/$$i.$(LIBMANSUFFIX)); \ @@\
-	done; \								@@\
-	$(RM) $${TMP})
+	cd $(DESTDIR)/destdir/cat$(LIBMANSUFFIX); \			@@\
+	for i in aliases; do \						@@\
+	$(RM) $$i.0; \							@@\
+	$(LN) file.0 $$i.0; \						@@\
+	done; \ 							@@\
+	cd $(DESTDIR)/destdir/ja_JP.EUC/cat$(LIBMANSUFFIX); \		@@\
+	for i in aliases; do \						@@\
+	$(RM) $$i.0; \							@@\
+	$(LN) file.0 $$i.0; \						@@\
+	done
 #ifndef MakeDirectoriesLong
 #define MakeDirectoriesLong(step,dirs,owner,group)			@@\
@@ -456,2 +488,11 @@ dst:: Canna.conf							@@\
 	 echo "#endif") > $@
 #endif
+
+#ifdef LinkFileList
+#undef LinkFileList
+#endif
+#define LinkFileList(step,list,dir,sub)					@@\
+step:: list								@@\
+	@MakeFlagsToShellFlags(i,set +e); \				@@\
+	echo "	cd" dir; cd dir && \					@@\
+	for i in list; do (set -x; $(LN) -f sub/$$i .); done
